usbvision: fix crash on detecting device with invalid configuration
authorVladis Dronov <vdronov@redhat.com>
Mon, 16 Nov 2015 17:55:11 +0000 (15:55 -0200)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 17 Mar 2016 01:25:23 +0000 (01:25 +0000)
commit02476ffb51e3b59b5c7273b24b29ce8de59b9686
treea1615469b6fefb25fed7337bea680caa96682d1b
parentb23fbb012d6f5cf39c9ab1c54297e2955b9b7f7f
usbvision: fix crash on detecting device with invalid configuration

The usbvision driver crashes when a specially crafted usb device with invalid
number of interfaces or endpoints is detected. This fix adds checks that the
device has proper configuration expected by the driver.

Reported-by: Ralf Spenneberg <ralf@spenneberg.net>
Signed-off-by: Vladis Dronov <vdronov@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Gbp-Pq: Topic bugfix/all
Gbp-Pq: Name media-usbvision-fix-crash-on-detecting-device-with-i.patch
drivers/media/usb/usbvision/usbvision-video.c